package com.yunfeng.greenfarm.service.impl;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.ResponseBody;

import com.yunfeng.greenfarm.dao.IUserBasicDao;
import com.yunfeng.greenfarm.model.user.UserBasic;
import com.yunfeng.greenfarm.service.IUserBasicService;


@Path("/userBasic")
@Service
@Transactional
public class UserBasicServiceImpl implements IUserBasicService{

	@Autowired
	private IUserBasicDao userBasicDao;

	@Override
	@GET
	@Path("/findByUserId/{userId}")
//	@Produces("application/json")
	@ResponseBody
	@Transactional
	public UserBasic findByUserId(@PathParam("userId")String userId) {
		UserBasic user = this.userBasicDao.findByUserId(userId);
		
		return user;
	}
	
	
	
}
